package com.gameObjects;

import android.util.Log;

import com.badlogic.androidgames.framework.gl.SpriteBatcher;
import com.badlogic.androidgames.framework.gl.TextureRegion;
import com.badlogic.androidgames.framework.math.Rectangle;
import com.badlogic.androidgames.framework.math.Vector2;
import com.baseinfinityrun.Assets;
import com.thoughtworks.xstream.annotations.XStreamAlias;

public class Barrier extends GameObject
{	
	public Barrier(float x, float y, float w, float h)
	{
		super(x, y, w, h);
		image = Assets.barrel;
		this.tag = "barrier";
	}
	
	public Barrier()
	{
		this.position = new Vector2();
		this.size = new Vector2();
		this.bounds = new Rectangle(0, 0, 0, 0);
		
		image = Assets.barrel;
		this.tag = "barrier";
	}

	@Override
	public void Draw(SpriteBatcher batcher) 
	{        		
        batcher.beginBatch(Assets.obstacles);
        batcher.drawSprite(this.position.x, this.position.y, this.bounds.width, this.bounds.height, this.image);
        batcher.endBatch();
	}
	
	public void SetBarrier()
	{
		this.bounds = new Rectangle(this.position.x,this.position.y,this.size.x,this.size.y);
		Log.d("testes", "x: " + this.position.x + "y: " + this.position.y);
	}
}
